#ifndef STRING_UTIL_H
#define STRING_UTIL_H

#include <string>
#include <vector>

/**
 * Split the string into seperate strings according to the seperator.
 */
std::vector<std::string> string_split(const std::string& args,
        const std::string& sep);

/**
 * Replace all strsrc in strBig to strdst.
 * (In other words, the vim command s/strsrc/strdst/g.)
 */
void string_replace(std::string& strBig, const std::string& strsrc,
        const std::string& strdst); 

inline void string_trim(std::string& s) {
    string_replace(s, " ", "");
}

#endif // STRING_UTIL_H
